#!/bin/bash
if [[ $BASH_SOURCE == $0 ]]
then
  echo -e "Please run this script via source as:\n $ source $0 \nor\n $ . $0"
  exit 0
fi

ROS_SVN=https://code.ros.org/svn/ros/stacks/ros/tags/latest
svn co $ROS_SVN ros
cwd=`pwd`

export ROS_ROOT=$cwd/ros
export PATH=$ROS_ROOT/bin:$PATH
export ROS_PACKAGE_PATH=$cwd/test
export ROS_MASTER_URI=http://localhost:11311
export PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATH
source $ROS_ROOT/tools/rosbash/rosbash

cd $cwd/ros && make && cd .. && cd test && make


